<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <%@include file="../my_js_css/cssInclude.jsp" %>

    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
    <style>
        ol, ul {
            list-style: none;
        }
    </style>
</head>
<body>
<div class="page-container">
    <!--/content-inner-->
    <div class="left-content">
        <div class="inner-content">
            <!-- header-starts -->
            <div class="header-section">
                <!--menu-right-->
                <div class="top_menu" style="height: 80px; text-align: center;">
                    <span style="display: inline-block; line-height: 80px; font-size: 30px; font-weight: 600; color: #fff">
                         智慧旅游
                    </span>
                    <a style=" float: right; color: #fff; margin: 26px 23px 0 0; font-size: 19px;" class="tooltips" href="/Tourism">
                        <i class="lnr lnr-power-switch"></i>
                    </a>
                    <div class="clearfix"></div>
                </div>
                <!--//menu-right-->
                <div class="clearfix"></div>
            </div>
            <!-- //header-ends -->
            <!--outter-wp-->
            <div class="outter-wp">
                <!--sub-heard-part-->
                <div class="sub-heard-part">
                    <ol class="breadcrumb m-b-0">
                        <li><a href="#">组任务</a></li>

                    </ol>
                </div>
                <!--//sub-heard-part-->
                <div class="graph-visual tables-main">
                    <div class="graph clearfix">
                        <div class="col-md-6 graph-2">
                            <h3 class="inner-tittle two">事件 详情 </h3>
                            <div class="grid-1">
                                <div class="form-body">
                                    <form class="form-horizontal">
                                        <div class="form-group" ><label for="inputEmail3" class="col-sm-2 control-label">标题</label>
                                            <div class="col-sm-9"><input disabled="true" type="email" class="form-control" value="${eventInfo.event_title}"
                                                                         id="inputEmail3" placeholder="Email"></div>
                                        </div>
                                        <div class="form-group"><label for="inputPassword3"
                                                                       class="col-sm-2 control-label">事件内容</label>
                                            <div class="col-sm-9"><input disabled="true" type="text" class="form-control" value="${eventInfo.event_content}"
                                                                         id="inputPassword3" placeholder="Password">
                                            </div>
                                        </div>
                                        <div class="form-group"><label for="inputEmail34" class="col-sm-2 control-label">上报人</label>
                                            <div class="col-sm-9"><input disabled="true" type="email" class="form-control" value="${eventInfo.emp_name}"
                                                                         id="inputEmail34" placeholder="Email"></div>
                                        </div>
                                        <div class="form-group"><label for="inputPassword35"
                                                                       class="col-sm-2 control-label">上报时间</label>
                                            <div class="col-sm-9"><input disabled="true" type="text" class="form-control"
                                                                         id="inputPassword35" value="${eventInfo.cdate}" >
                                            </div>
                                        </div>
                                        <div class="form-group"><label for="inputEmail36" class="col-sm-2 control-label">发生地点</label>
                                            <div class="col-sm-9"><input disabled="true" type="email" class="form-control" value="${eventInfo.event_address}"
                                                                         id="inputEmail36" placeholder="Email"></div>
                                        </div>
                                        <div class="form-group"><label for="inputPassword34"
                                                                       class="col-sm-2 control-label">上报人电话</label>
                                            <div class="col-sm-9"><input disabled="true" type="text" class="form-control" value="${eventInfo.phone}"
                                                                         id="inputPassword34" placeholder="Password">
                                            </div>
                                        </div>


                                    </form>
                                </div>
                                <div id="container" class="form-control" style="height:300px;">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6 graph-2 second">
                            <h3 class="inner-tittle two">时间轴 </h3>
                            <div class="grid-1">
                                <div class="form-body">
                                    <div data-example-id="simple-form-inline">

                                            <c:forEach items="${commentList}" var="obj" >
                                            <button type="button" class="btn btn-default">${obj.time}</button>
                                            <div class="form-group"><input type="email" class="form-control" value="${obj.userId}"
                                                                           id="exampleInputEmail3" placeholder="Email">
                                            </div>
                                            <div class="form-group"><input type="text" class="form-control" value="${obj.fullMessage}"
                                                                           id="exampleInputPassword3"
                                                                           placeholder="Password"></div>
                                            </c:forEach>
                                    </div>
                                </div>
                            </div>
                            <form class="form-inline" action="${ctx}/work/completeTask" method="post">
                                <input type="hidden" value="${eventInfo.event_id}" name="eventId">
                                <c:forEach items="${outcomeList}" var="outcome" varStatus="s">
                                    <c:if test="${outcome=='派发执法'}">
                                        <div id="emps">
                                            <select id="emp" name="empId">
                                                <option>请选择</option>
                                                <c:forEach items="${emps}" var="emp" >
                                                    <option value="${emp.emp_id}">${emp.emp_name}</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </c:if>
                                </c:forEach>

                            <div class="col-md-12 form-group1" style="padding: 0; ">
                                <textarea style="resize: none;" id="comment" name="comment"></textarea>
                            </div>
                            <div class="cont-btn">

                                <c:forEach items="${outcomeList}" var="outcome" varStatus="s">
                                    <button type="submit" name="outcome" value="${outcome}" class="btn blue four" >${outcome}</button>
                                </c:forEach>
                                <button type="button" class="btn blue four" onclick="back()">返回</button>
                            </div>
                            </form>
                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>
    <!--//content-inner-->
    <!--/sidebar-menu-->
    <div class="sidebar-menu">
        <header class="logo">
            <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a>
            <a href="${ctx}/sys/index "> <span id="logo"> <h1>智慧旅游</h1></span> </a>
        </header>
        <div class="down">
            <a   style="display: inline-block;">
                <img style="width: 58px; border: 3px solid #ddd; margin-top: -30px" src="http://202.97.207.34:8199/user.png">
            </a>
            <a    style="display: inline-block; margin-left: 10px; text-align: left;">
                <span style="font-size: 15px; display: inline-block; margin-left: 9px;" class=" name-caret">${emp_name}</span><br />
                <p style="display: inline-block;" id="clock3"></p>
            </a>
        </div>

        <div style="border-top:1px solid rgba(69, 74, 84, 0.7)"></div>

        <div class="menu">
            <ul id="menu" >
                <li><a href="${ctx}/work/addEvent"><i class="lnr lnr-pencil"></i> <span>上报事件</span></a></li>
                <li><a href="${ctx}/work/zworkIndex"><i class="fa fa-file-text-o"></i> <span>组任务</span></a></li>
                <li><a href="${ctx}/work/gworkIndex"><i class="fa fa-file-text-o"></i> <span>个人任务</span></a></li>
                <li><a href="${ctx}/work/insertEvent"><i class="lnr lnr-pencil"></i> <span>提交事件流</span></a></li>
                <li><a href="${ctx}/work/queryAllEvent"><i class="lnr lnr-pencil"></i> <span>查询事件</span></a></li>
                <li id="menu-academico" >
                    <a ><i class="fa fa-table"></i> <span> 系统管理</span> <span class="fa fa-angle-right" style="float: right"></span></a>
                    <ul id="menu-academico-sub" >
                        <li><a href="${ctx}/emp/empIndex">人员管理</a></li>
                        <li><a href="${ctx}/org/orgIndex">部门管理</a></li>
                        <li><a href="${ctx}/role/roleIndex">角色管理</a></li>
                        <li><a href="${ctx}/sys/grid">网格管理</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="clearfix"></div>
</div>

<%@include file="../my_js_css/jsInclude.jsp" %>
</body>
<script src="http://webapi.amap.com/maps?v=1.4.4&key=a9cc973368bc35f8eae77052967ebcb1&callback=loadMap"></script>
<script>
    var map, marker;
    function loadMap(gridId) {
        map = new AMap.Map('container', {
            resizeEnable: true,
            center: [126.604113, 45.728067],
            zoom: 13
        });
        var x =${eventInfo.lng};
        var y =${eventInfo.lat};
        GetCoordinates(x, y)
        map.setCenter(new AMap.LngLat(x, y));
    }

    function GetCoordinates(x,y){
        map.clearMap();
        marker && marker.setMap(null);
        if(x!=null&&x!=""&&y!=null&&y!=""){
            marker = new AMap.Marker({
                position: new AMap.LngLat(x, y),
                clickable: true
            });

        }
        iconURL = "https://webapi.amap.com/theme/v1.3/markers/n/mark_bs.png";

        marker.setIcon(iconURL);
        marker.setMap(map); //在地图上添加点
//        $(window.frames["ifr"].document).find("#occurrence_point").val(x+","+y);

    }
</script>
<script>
    function claim(eventId,empId) {
        var tourl = "${ctx}/work/claim?eventId="+eventId+"&empId="+empId
        window.location.href=tourl;
    }
    function back() {
        window.location.href = "${ctx}/work/gworkIndex";
    }

</script>
</html>